{extend name="layout" /}
{block name="content"}
<div class="mui-content">
	<form id="formid" method="post">
	<div class="tm-df-size">
		<div class="tm-label tm-font-gray">
			<div class="main-content">
				<span>海报图片</span>
			</div>
		</div>
		<ul class="mui-table-view max no">
			<li class="mui-table-view-cell">
				<div class="tm-cell-pad">
					<div class="tm-flex flex-align-center">
						<div class="tm-icon-item">
							<img src="{$info.thumb}" alt="" width="50%" />
							<input type="hidden" name="origid" value="{$info.id}">
							<input type="hidden" name="thumb" value="{$info.thumb}">
						</div>
					</div>
				</div>
			</li>
		</ul>
	</div>
	<div class="tm-df-size">
		<div class="tm-label tm-font-gray">
			<div class="main-content">
				<span>选择分享信息</span>
			</div>
		</div>
		<ul class="mui-table-view max">
			<!-- <li class="mui-table-view-cell">
				<div class="tm-cell-pad">
					<div class="tm-flex flex-align-center">
						<div class="tm-flex-1">
							<span class="tm-font-bold">选择模板</span>
						</div>
						<div class="tm-icon-item">
							<select id="formworkid" style="height: 30px;padding: 2px;margin-right: 25px;padding-left: 100px;">
								<option value="1">模板1</option>
								<option value="2">模板2</option>
								<option value="3">模板3</option>
							</select>
						</div>
					</div>
				</div>
			</li> -->
			<li class="mui-table-view-cell">
				<div class="tm-cell-pad">
					<div class="tm-flex flex-align-center">
						<div class="tm-flex-1">
							<span class="tm-font-bold">选择标题</span>
						</div>
						<div class="tm-icon-item">
							<select id="select_title" style="height: 30px;padding: 2px;margin-right: 25px;padding-left: 100px;">
								<option value="">{$info.descrip}</option>
								{volist name="info.titles" id="v"}
								<option value="{$key}">{$v}</option>
								{/volist}
							</select>
						</div>
					</div>
				</div>
			</li>
		</ul>
	</div>
	</form>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	function suc_back (obj, data) {
		$("#thumb").attr('src', data.thumb);
		$("#creat_thumb").val(data.thumb);
	}
</script>
<script type="text/javascript">
    function suc_share(obj, data) {
		coco_msg('分享成功');
		return false;
	}
	$(document).ready(function() {
		var datajson = {};
		datajson.title = '{$info.title}';
		datajson.desc = '{$info.descrip}';
		datajson.path = '{$info.thumb}';
		datajson.thumb = '{$info.thumb}';
		datajson.typeid = '4'; // 分享类型 typeid 1:登录，2:介绍建档，3：成交，4：分享海报，5：分享文章，6：分享活动
		datajson.contentid = '{$info.id}';
		console.dir(datajson);
		wx.miniProgram.postMessage({
		    data: datajson
		});
	});
</script>
{/block}